//用户接收管理员发来的系统消息
export async function user_systemMsg_recv(proxy) {
    try {
        const response = await proxy.$http.post(`/receive/`, { });
        if (response.status !== 200)
            throw new Error(`HTTP error! Status: ${response.status}`);

        return response;
    } catch (error) {
        console.error('Error:', error);
        throw error;
    }
}

//用户接收书籍的更新信息
export async function user_updateMsg_recv(proxy) {
    try {
        const response = await proxy.$http.post(`/get_update/`);
        if (response.status !== 200)
            throw new Error(`HTTP error! Status: ${response.status}`);

        return response;
    } catch (error) {
        console.error('Error:', error);
        throw error;
    }
}

//用户删除书籍的更新信息
export async function user_deleteMsg(id, proxy) {
    try {
        const response = await proxy.$http.post(`/del_update/`, { id: id });
        if (response.status !== 200)
            throw new Error(`HTTP error! Status: ${response.status}`);

        return response;
    } catch (error) {
        console.error('Error:', error);
        throw error;
    }
}

